<%@ include file="/common/taglibs.jsp"%>

<title><fmt:message key="restList.title"/></title>
<content tag="heading"><fmt:message key="restList.heading"/></content>
<meta name="menu" content="RestMenu"/>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/editRest.html"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<html:rewrite forward="mainMenu"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false"/>

<display:table name="restList" cellspacing="0" cellpadding="0"
    id="restList" pagesize="25" class="table restList"
    export="true" requestURI="">

    <display:column property="id" sortable="true" headerClass="sortable"
        url="/editRest.html" paramId="id" paramProperty="id"
        titleKey="restForm.id"/>
    <display:column property="restId" sortable="true" headerClass="sortable"
         titleKey="restForm.restId"/>
    <display:column property="restName" sortable="true" headerClass="sortable"
         titleKey="restForm.restName"/>
    <display:column property="restCategory" sortable="true" headerClass="sortable"
         titleKey="restForm.restCategory"/>
    <display:column property="restUnit" sortable="true" headerClass="sortable"
         titleKey="restForm.restUnit"/>
    <display:column property="srestUnit" sortable="true" headerClass="sortable"
         titleKey="restForm.srestUnit"/>
    <display:column property="restHours" sortable="true" headerClass="sortable"
         titleKey="restForm.restHours"/>
    <display:column property="limitDays" sortable="true" headerClass="sortable"
         titleKey="restForm.limitDays"/>
    <display:column property="yearLimit" sortable="true" headerClass="sortable"
         titleKey="restForm.yearLimit"/>
    <display:column property="attachment" sortable="true" headerClass="sortable"
         titleKey="restForm.attachment"/>
    <display:column property="restDescription" sortable="true" headerClass="sortable"
         titleKey="restForm.restDescription"/>
    <display:column property="factoryApprove" sortable="true" headerClass="sortable"
         titleKey="restForm.factoryApprove"/>
    <display:setProperty name="paging.banner.item_name"><fmt:message key="restList.title"/></display:setProperty>
    <display:setProperty name="paging.banner.items_name"><fmt:message key="restList.title"/></display:setProperty>
</display:table>

<c:out value="${buttons}" escapeXml="false"/>

<script type="text/javascript">
    highlightTableRows("restList");
</script>
